package com.azier.kapacitor.script.node.nodebind;

import com.azier.kapacitor.script.node.Node;
import com.azier.kapacitor.script.node.QueryNode;

/**
* 1 * @Author: luoj
* 2 * @Date: 2019/11/8 11:27
* 3
*/

/**
The query to execute. Must not contain a time condition in the WHERE clause or contain a GROUP BY clause. The time conditions are added dynamically according to the period, offset and schedule. The GROUP BY clause is added dynamically according to the dimensions passed to the groupBy method.
**/

/**
要执行的查询。不能在WHERE子句中包含时间条件，也不能包含GROUP BY子句。时间条件会根据时间段，偏移量和时间表动态添加。 GROUP BY子句是根据传递给groupBy方法的尺寸动态添加的。
**/
public interface QueryNodeBind extends Node {
    /** ------------------------------------------------ **/
    /** 链接节点  **/
    /** ------------------------------------------------ **/
    default QueryNode query(String q){
        QueryNode nextNode = new QueryNode(q);
        this.setNextNode(nextNode);
        nextNode.zetHeadNode(this.getHeadNode());
        return nextNode;
    }
}